package tt.dz.appserver.dao.ext;

import java.util.List;

import org.apache.commons.collections.map.ListOrderedMap;
import org.springframework.stereotype.Repository;

import tt.dz.appserver.dao.base.BasisDao;
import tt.dz.appserver.entity.model.dic.District;
import tt.dz.appserver.util.StringUtils;

@Repository
public class DistrictDao extends BasisDao<District>{

	/**区县查询*/
	public List<District> findDistrictbyCity(String cityid) {
		
		ListOrderedMap map = new ListOrderedMap();
		if (StringUtils.isNotBlank(cityid)) {
			map.put("city_id", cityid);
		}
		return super.findListAutomaticOfClass(District.class, map, null, null, "district_name", 1);
	}
}
